package com.tourism.home.controller.system;import com.tourism.home.entity.Result;import com.tourism.home.service.NoticeService;import com.tourism.home.utils.ResultUtil;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.web.bind.annotation.*;/** * @author wanglinli * at 18-4-10 下午9:30 * 注释:公告控制器(public方法是要权限验证的) */@RestControllerpublic class NoticeController {    @Autowired    NoticeService noticeService;    @GetMapping(value = "/notice/new")    Result getNewNotice(){        Object object = noticeService.getNewNotice();        if(object != null){            return ResultUtil.success(object);        }else {            return ResultUtil.error(null);        }    }}